Afaik almost all ATM everywhere grab the money back to prevent theft in case a person really forgets to take his money.
Of course the ATM will record that it took the money back, and make a note on your transaction. Quite likely the bank could see right away that your withdrawal was cancelled.
I guess HQ just wants to check these cancelled transactions to prevent fraud.
For example, I know there used to be a scam where one could carefully take only the middle bill(s) and wait for the ATM to swallow what's left, unaware of the missing bills. The person would still get the whole amount credited on their account.
Today they probably match your cancelled withdrawal claim with any accounting differences in that specific ATM after they refill it. And that would mean waiting for the regular refilling schedule....